home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 21.zip / BS1 part 21 / Professional Page v4.0 (1993)(Gold Disk)(Disk 1 of 4)[HD].7z / Professional Page v4.0 (1993)(Gold Disk)(Disk 1 of 4)[HD].adf / rexx.lzh / ItemToFront.rexx < prev    next >
OS/2 REXX Batch file  |  1992-03-13  |  266b  |  18 lines

  1. /*
  2.     Item To Front
  3.     Puts an item to the front of a list
  4. */
  5.  
  6. parse arg item, list
  7.  
  8.  
  9. if item =  '' then return(list)
  10.  
  11. stringpos = pos(item, list)
  12. if stringpos ~= 0 then
  13. do
  14.     list = delstr(list, stringpos, length(item) + 1)
  15.     list = item || '0a'x || list
  16. end
  17. return(list)
  18.